package com.mifengs.mall.netWork.api;

import com.mifengs.mall.Constant;
import com.mifengs.mall.entity.CategoriesBean;
import com.mifengs.mall.entity.City;
import com.mifengs.mall.entity.ContractPre;
import com.mifengs.mall.entity.HomeData;
import com.mifengs.mall.entity.ResponseBean;
import com.mifengs.mall.entity.ResponseInfo;
import com.mifengs.mall.entity.StoreCertificate;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import okhttp3.ResponseBody;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import rx.Observable;

/**
 * Created by lihaoqi on 2017/11/3.
 */

public interface MaterialSubApi {

    @GET(Constant.LOAD_CATEGORIES)
    Observable<List<CategoriesBean>> getCategories(
    );

    @FormUrlEncoded
    @POST(Constant.SAVE_STORE_CERTIFICATE)
    Observable<ResponseBean<ContractPre>> saveStoreCertificate(
            @FieldMap Map<String, Object> map
    );

    @FormUrlEncoded
    @POST(Constant.SAVE_AGREEMENT_PIC)
    Observable<ResponseBean> saveAgreementPic(
            @FieldMap Map<String, Object> map
    );

    @FormUrlEncoded
    @POST(Constant.GET_AGREEMENT_URL)
    Observable<ResponseBean<ContractPre>> getAgreementPre(
            @FieldMap Map<String, Object> map
    );

    @FormUrlEncoded
    @POST(Constant.GET_STORE_CERTIFICATE)
    Observable<ResponseBean<StoreCertificate>> getStoreCertificate(
            @FieldMap Map<String, Object> map
    );

    @POST(Constant.GET_PROVINCES)
    Observable<ArrayList<City>> getProvinces(
    );

    @FormUrlEncoded
    @POST(Constant.GET_CITIES)
    Observable<ArrayList<City>> getCitys(
            @FieldMap Map<String, Object> map
    );

    @FormUrlEncoded
    @POST(Constant.GET_AREAS)
    Observable<ArrayList<City>> getAreas(
            @FieldMap Map<String, Object> map
    );

    @FormUrlEncoded
    @POST(Constant.GET_STREETS)
    Observable<ArrayList<City>> getStreets(
            @FieldMap Map<String, Object> map
    );

}
